<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // const ws = new WeakSet();
        // // ws.add(1)
        // ws.add(Symbol())

        // const a = [[1, 2], [3, 4]];
        // const ws = new WeakSet(a);
        // console.log(ws);

        const ws = new WeakSet();
        const obj = {};
        const foo = {};
        ws.add(window);
        ws.add(obj);
        console.log(ws.has(window));  // true
        console.log(ws.has(foo)); // false
        ws.delete(window); 
        console.log(ws.has(window));  // false
    </script>
</body>
</html>